.class public Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;
.super Ljava/lang/Object;
.source "SpdyHeaders.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;,
        Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$HttpNames;
    }
.end annotation


# static fields
.field private static final BUCKET_SIZE:I = 0x11


# instance fields
.field private final entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

.field private final head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;


# direct methods
.method constructor <init>()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 300
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 297
    const/16 v0, 0x11

    new-array v0, v0, [Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iput-object v0, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 298
    new-instance v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    const/4 v1, -0x1

    invoke-direct {v0, v1, v2, v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;-><init>(ILjava/lang/String;Ljava/lang/String;)V

    iput-object v0, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 301
    iget-object v0, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iget-object v1, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iput-object v2, v1, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->after:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iput-object v2, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->before:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 302
    return-void
.end method

.method public static addHeader(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Ljava/lang/String;Ljava/lang/Object;)V
    .locals 0
    .parameter "block"
    .parameter "name"
    .parameter "value"

    .prologue
    .line 114
    invoke-interface {p0, p1, p2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->addHeader(Ljava/lang/String;Ljava/lang/Object;)V

    .line 115
    return-void
.end method

.method private addHeader0(IILjava/lang/String;Ljava/lang/String;)V
    .locals 3
    .parameter "h"
    .parameter "i"
    .parameter "name"
    .parameter "value"

    .prologue
    .line 316
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    aget-object v0, v2, p2

    .line 318
    .local v0, e:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    new-instance v1, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    invoke-direct {v1, p1, p3, p4}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;-><init>(ILjava/lang/String;Ljava/lang/String;)V

    .local v1, newEntry:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    aput-object v1, v2, p2

    .line 319
    iput-object v0, v1, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 322
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    invoke-virtual {v1, v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->addBefore(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;)V

    .line 323
    return-void
.end method

.method private static eq(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 8
    .parameter "name1"
    .parameter "name2"

    .prologue
    const/16 v7, 0x5a

    const/16 v6, 0x41

    const/4 v4, 0x0

    .line 270
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v3

    .line 271
    .local v3, nameLen:I
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v5

    if-eq v3, v5, :cond_1

    .line 290
    :cond_0
    :goto_0
    return v4

    .line 275
    :cond_1
    add-int/lit8 v2, v3, -0x1

    .local v2, i:I
    :goto_1
    if-ltz v2, :cond_5

    .line 276
    invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C

    move-result v0

    .line 277
    .local v0, c1:C
    invoke-virtual {p1, v2}, Ljava/lang/String;->charAt(I)C

    move-result v1

    .line 278
    .local v1, c2:C
    if-eq v0, v1, :cond_4

    .line 279
    if-lt v0, v6, :cond_2

    if-gt v0, v7, :cond_2

    .line 280
    add-int/lit8 v5, v0, 0x20

    int-to-char v0, v5

    .line 282
    :cond_2
    if-lt v1, v6, :cond_3

    if-gt v1, v7, :cond_3

    .line 283
    add-int/lit8 v5, v1, 0x20

    int-to-char v1, v5

    .line 285
    :cond_3
    if-ne v0, v1, :cond_0

    .line 275
    :cond_4
    add-int/lit8 v2, v2, -0x1

    goto :goto_1

    .line 290
    .end local v0           #c1:C
    .end local v1           #c2:C
    :cond_5
    const/4 v4, 0x1

    goto :goto_0
.end method

.method public static getHeader(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "block"
    .parameter "name"

    .prologue
    .line 75
    invoke-interface {p0, p1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->getHeader(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getHeader(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "block"
    .parameter "name"
    .parameter "defaultValue"

    .prologue
    .line 87
    invoke-interface {p0, p1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->getHeader(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 88
    .local v0, value:Ljava/lang/String;
    if-nez v0, :cond_0

    .line 91
    .end local p2
    :goto_0
    return-object p2

    .restart local p2
    :cond_0
    move-object p2, v0

    goto :goto_0
.end method

.method public static getMethod(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)Lorg/jboss/netty/handler/codec/http/HttpMethod;
    .locals 2
    .parameter "block"

    .prologue
    .line 129
    :try_start_0
    const-string v1, "method"

    invoke-interface {p0, v1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->getHeader(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lorg/jboss/netty/handler/codec/http/HttpMethod;->valueOf(Ljava/lang/String;)Lorg/jboss/netty/handler/codec/http/HttpMethod;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v1

    .line 131
    :goto_0
    return-object v1

    .line 130
    :catch_0
    move-exception v0

    .line 131
    .local v0, e:Ljava/lang/Exception;
    const/4 v1, 0x0

    goto :goto_0
.end method

.method public static getScheme(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)Ljava/lang/String;
    .locals 1
    .parameter "block"

    .prologue
    .line 153
    const-string v0, "scheme"

    invoke-interface {p0, v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->getHeader(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getStatus(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;
    .locals 7
    .parameter "block"

    .prologue
    .line 175
    :try_start_0
    const-string v6, "status"

    invoke-interface {p0, v6}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->getHeader(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    .line 176
    .local v5, status:Ljava/lang/String;
    const/16 v6, 0x20

    invoke-virtual {v5, v6}, Ljava/lang/String;->indexOf(I)I

    move-result v4

    .line 177
    .local v4, space:I
    const/4 v6, -0x1

    if-ne v4, v6, :cond_1

    .line 178
    invoke-static {v5}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v6

    invoke-static {v6}, Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;->valueOf(I)Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;

    move-result-object v3

    .line 190
    .end local v4           #space:I
    .end local v5           #status:Ljava/lang/String;
    :cond_0
    :goto_0
    return-object v3

    .line 180
    .restart local v4       #space:I
    .restart local v5       #status:Ljava/lang/String;
    :cond_1
    const/4 v6, 0x0

    invoke-virtual {v5, v6, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    .line 181
    .local v0, code:I
    add-int/lit8 v6, v4, 0x1

    invoke-virtual {v5, v6}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v2

    .line 182
    .local v2, reasonPhrase:Ljava/lang/String;
    invoke-static {v0}, Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;->valueOf(I)Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;

    move-result-object v3

    .line 183
    .local v3, responseStatus:Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;
    invoke-virtual {v3}, Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;->getReasonPhrase()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_0

    .line 186
    new-instance v3, Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;

    .end local v3           #responseStatus:Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;
    invoke-direct {v3, v0, v2}, Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;-><init>(ILjava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 189
    .end local v0           #code:I
    .end local v2           #reasonPhrase:Ljava/lang/String;
    .end local v4           #space:I
    .end local v5           #status:Ljava/lang/String;
    :catch_0
    move-exception v1

    .line 190
    .local v1, e:Ljava/lang/Exception;
    const/4 v3, 0x0

    goto :goto_0
.end method

.method public static getUrl(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)Ljava/lang/String;
    .locals 1
    .parameter "block"

    .prologue
    .line 212
    const-string v0, "url"

    invoke-interface {p0, v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->getHeader(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getVersion(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)Lorg/jboss/netty/handler/codec/http/HttpVersion;
    .locals 2
    .parameter "block"

    .prologue
    .line 234
    :try_start_0
    const-string v1, "version"

    invoke-interface {p0, v1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->getHeader(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lorg/jboss/netty/handler/codec/http/HttpVersion;->valueOf(Ljava/lang/String;)Lorg/jboss/netty/handler/codec/http/HttpVersion;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v1

    .line 236
    :goto_0
    return-object v1

    .line 235
    :catch_0
    move-exception v0

    .line 236
    .local v0, e:Ljava/lang/Exception;
    const/4 v1, 0x0

    goto :goto_0
.end method

.method private static hash(Ljava/lang/String;)I
    .locals 4
    .parameter "name"

    .prologue
    .line 251
    const/4 v1, 0x0

    .line 252
    .local v1, h:I
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v3

    add-int/lit8 v2, v3, -0x1

    .local v2, i:I
    :goto_0
    if-ltz v2, :cond_1

    .line 253
    invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C

    move-result v0

    .line 254
    .local v0, c:C
    const/16 v3, 0x41

    if-lt v0, v3, :cond_0

    const/16 v3, 0x5a

    if-gt v0, v3, :cond_0

    .line 255
    add-int/lit8 v3, v0, 0x20

    int-to-char v0, v3

    .line 257
    :cond_0
    mul-int/lit8 v3, v1, 0x1f

    add-int v1, v3, v0

    .line 252
    add-int/lit8 v2, v2, -0x1

    goto :goto_0

    .line 260
    .end local v0           #c:C
    :cond_1
    if-lez v1, :cond_2

    .line 265
    .end local v1           #h:I
    :goto_1
    return v1

    .line 262
    .restart local v1       #h:I
    :cond_2
    const/high16 v3, -0x8000

    if-ne v1, v3, :cond_3

    .line 263
    const v1, 0x7fffffff

    goto :goto_1

    .line 265
    :cond_3
    neg-int v1, v1

    goto :goto_1
.end method

.method private static index(I)I
    .locals 1
    .parameter "hash"

    .prologue
    .line 294
    rem-int/lit8 v0, p0, 0x11

    return v0
.end method

.method private removeHeader0(IILjava/lang/String;)V
    .locals 4
    .parameter "h"
    .parameter "i"
    .parameter "name"

    .prologue
    .line 336
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    aget-object v0, v2, p2

    .line 337
    .local v0, e:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    if-nez v0, :cond_0

    .line 369
    :goto_0
    return-void

    .line 342
    :cond_0
    :goto_1
    iget v2, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->hash:I

    if-ne v2, p1, :cond_3

    iget-object v2, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->key:Ljava/lang/String;

    invoke-static {p3, v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->eq(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_3

    .line 343
    invoke-virtual {v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->remove()V

    .line 344
    iget-object v1, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 345
    .local v1, next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    if-eqz v1, :cond_1

    .line 346
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    aput-object v1, v2, p2

    .line 347
    move-object v0, v1

    goto :goto_1

    .line 349
    :cond_1
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    const/4 v3, 0x0

    aput-object v3, v2, p2

    goto :goto_0

    .line 362
    :cond_2
    iget v2, v1, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->hash:I

    if-ne v2, p1, :cond_4

    iget-object v2, v1, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->key:Ljava/lang/String;

    invoke-static {p3, v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->eq(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_4

    .line 363
    iget-object v2, v1, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iput-object v2, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 364
    invoke-virtual {v1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->remove()V

    .line 358
    .end local v1           #next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    :cond_3
    :goto_2
    iget-object v1, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 359
    .restart local v1       #next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    if-nez v1, :cond_2

    goto :goto_0

    .line 366
    :cond_4
    move-object v0, v1

    goto :goto_2
.end method

.method public static removeMethod(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)V
    .locals 1
    .parameter "block"

    .prologue
    .line 121
    const-string v0, "method"

    invoke-interface {p0, v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->removeHeader(Ljava/lang/String;)V

    .line 122
    return-void
.end method

.method public static removeScheme(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)V
    .locals 1
    .parameter "block"

    .prologue
    .line 146
    const-string v0, "scheme"

    invoke-interface {p0, v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->removeHeader(Ljava/lang/String;)V

    .line 147
    return-void
.end method

.method public static removeStatus(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)V
    .locals 1
    .parameter "block"

    .prologue
    .line 167
    const-string v0, "status"

    invoke-interface {p0, v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->removeHeader(Ljava/lang/String;)V

    .line 168
    return-void
.end method

.method public static removeUrl(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)V
    .locals 1
    .parameter "block"

    .prologue
    .line 205
    const-string v0, "url"

    invoke-interface {p0, v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->removeHeader(Ljava/lang/String;)V

    .line 206
    return-void
.end method

.method public static removeVersion(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;)V
    .locals 1
    .parameter "block"

    .prologue
    .line 226
    const-string v0, "version"

    invoke-interface {p0, v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->removeHeader(Ljava/lang/String;)V

    .line 227
    return-void
.end method

.method public static setHeader(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Ljava/lang/String;Ljava/lang/Iterable;)V
    .locals 0
    .parameter "block"
    .parameter "name"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;",
            "Ljava/lang/String;",
            "Ljava/lang/Iterable",
            "<*>;)V"
        }
    .end annotation

    .prologue
    .line 107
    .local p2, values:Ljava/lang/Iterable;,"Ljava/lang/Iterable<*>;"
    invoke-interface {p0, p1, p2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->setHeader(Ljava/lang/String;Ljava/lang/Iterable;)V

    .line 108
    return-void
.end method

.method public static setHeader(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Ljava/lang/String;Ljava/lang/Object;)V
    .locals 0
    .parameter "block"
    .parameter "name"
    .parameter "value"

    .prologue
    .line 99
    invoke-interface {p0, p1, p2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->setHeader(Ljava/lang/String;Ljava/lang/Object;)V

    .line 100
    return-void
.end method

.method public static setMethod(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Lorg/jboss/netty/handler/codec/http/HttpMethod;)V
    .locals 2
    .parameter "block"
    .parameter "method"

    .prologue
    .line 139
    const-string v0, "method"

    invoke-virtual {p1}, Lorg/jboss/netty/handler/codec/http/HttpMethod;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-interface {p0, v0, v1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->setHeader(Ljava/lang/String;Ljava/lang/Object;)V

    .line 140
    return-void
.end method

.method public static setScheme(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Ljava/lang/String;)V
    .locals 1
    .parameter "block"
    .parameter "value"

    .prologue
    .line 160
    const-string v0, "scheme"

    invoke-interface {p0, v0, p1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->setHeader(Ljava/lang/String;Ljava/lang/Object;)V

    .line 161
    return-void
.end method

.method public static setStatus(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;)V
    .locals 2
    .parameter "block"
    .parameter "status"

    .prologue
    .line 198
    const-string v0, "status"

    invoke-virtual {p1}, Lorg/jboss/netty/handler/codec/http/HttpResponseStatus;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {p0, v0, v1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->setHeader(Ljava/lang/String;Ljava/lang/Object;)V

    .line 199
    return-void
.end method

.method public static setUrl(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Ljava/lang/String;)V
    .locals 1
    .parameter "block"
    .parameter "value"

    .prologue
    .line 219
    const-string v0, "url"

    invoke-interface {p0, v0, p1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->setHeader(Ljava/lang/String;Ljava/lang/Object;)V

    .line 220
    return-void
.end method

.method public static setVersion(Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;Lorg/jboss/netty/handler/codec/http/HttpVersion;)V
    .locals 2
    .parameter "block"
    .parameter "version"

    .prologue
    .line 244
    const-string v0, "version"

    invoke-virtual {p1}, Lorg/jboss/netty/handler/codec/http/HttpVersion;->getText()Ljava/lang/String;

    move-result-object v1

    invoke-interface {p0, v0, v1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaderBlock;->setHeader(Ljava/lang/String;Ljava/lang/Object;)V

    .line 245
    return-void
.end method

.method private static toString(Ljava/lang/Object;)Ljava/lang/String;
    .locals 1
    .parameter "value"

    .prologue
    .line 476
    if-nez p0, :cond_0

    .line 477
    const/4 v0, 0x0

    .line 479
    :goto_0
    return-object v0

    :cond_0
    invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method


# virtual methods
.method addHeader(Ljava/lang/String;Ljava/lang/Object;)V
    .locals 4
    .parameter "name"
    .parameter "value"

    .prologue
    .line 305
    invoke-virtual {p1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v2

    .line 306
    .local v2, lowerCaseName:Ljava/lang/String;
    invoke-static {v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyCodecUtil;->validateHeaderName(Ljava/lang/String;)V

    .line 307
    invoke-static {p2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->toString(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    .line 308
    .local v3, strVal:Ljava/lang/String;
    invoke-static {v3}, Lorg/jboss/netty/handler/codec/spdy/SpdyCodecUtil;->validateHeaderValue(Ljava/lang/String;)V

    .line 309
    invoke-static {v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->hash(Ljava/lang/String;)I

    move-result v0

    .line 310
    .local v0, h:I
    invoke-static {v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->index(I)I

    move-result v1

    .line 311
    .local v1, i:I
    invoke-direct {p0, v0, v1, v2, v3}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->addHeader0(IILjava/lang/String;Ljava/lang/String;)V

    .line 312
    return-void
.end method

.method clearHeaders()V
    .locals 4

    .prologue
    .line 405
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v1, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    array-length v1, v1

    if-ge v0, v1, :cond_0

    .line 406
    iget-object v1, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    const/4 v2, 0x0

    aput-object v2, v1, v0

    .line 405
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 408
    :cond_0
    iget-object v1, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iget-object v3, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iput-object v3, v2, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->after:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iput-object v3, v1, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->before:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 409
    return-void
.end method

.method containsHeader(Ljava/lang/String;)Z
    .locals 1
    .parameter "name"

    .prologue
    .line 461
    invoke-virtual {p0, p1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->getHeader(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method getHeader(Ljava/lang/String;)Ljava/lang/String;
    .locals 5
    .parameter "name"

    .prologue
    .line 412
    if-nez p1, :cond_0

    .line 413
    new-instance v3, Ljava/lang/NullPointerException;

    const-string v4, "name"

    invoke-direct {v3, v4}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v3

    .line 416
    :cond_0
    invoke-static {p1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->hash(Ljava/lang/String;)I

    move-result v1

    .line 417
    .local v1, h:I
    invoke-static {v1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->index(I)I

    move-result v2

    .line 418
    .local v2, i:I
    iget-object v3, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    aget-object v0, v3, v2

    .line 419
    .local v0, e:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    :goto_0
    if-eqz v0, :cond_2

    .line 420
    iget v3, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->hash:I

    if-ne v3, v1, :cond_1

    iget-object v3, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->key:Ljava/lang/String;

    invoke-static {p1, v3}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->eq(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 421
    iget-object v3, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->value:Ljava/lang/String;

    .line 426
    :goto_1
    return-object v3

    .line 424
    :cond_1
    iget-object v0, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    goto :goto_0

    .line 426
    :cond_2
    const/4 v3, 0x0

    goto :goto_1
.end method

.method getHeaderNames()Ljava/util/Set;
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Set",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 465
    new-instance v1, Ljava/util/TreeSet;

    invoke-direct {v1}, Ljava/util/TreeSet;-><init>()V

    .line 467
    .local v1, names:Ljava/util/Set;,"Ljava/util/Set<Ljava/lang/String;>;"
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iget-object v0, v2, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->after:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 468
    .local v0, e:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    :goto_0
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    if-eq v0, v2, :cond_0

    .line 469
    iget-object v2, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->key:Ljava/lang/String;

    invoke-interface {v1, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 470
    iget-object v0, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->after:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    goto :goto_0

    .line 472
    :cond_0
    return-object v1
.end method

.method getHeaders()Ljava/util/List;
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/util/Map$Entry",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;>;"
        }
    .end annotation

    .prologue
    .line 449
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    .line 452
    .local v0, all:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map$Entry<Ljava/lang/String;Ljava/lang/String;>;>;"
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    iget-object v1, v2, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->after:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    .line 453
    .local v1, e:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    :goto_0
    iget-object v2, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->head:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    if-eq v1, v2, :cond_0

    .line 454
    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 455
    iget-object v1, v1, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->after:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    goto :goto_0

    .line 457
    :cond_0
    return-object v0
.end method

.method getHeaders(Ljava/lang/String;)Ljava/util/List;
    .locals 6
    .parameter "name"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 430
    if-nez p1, :cond_0

    .line 431
    new-instance v4, Ljava/lang/NullPointerException;

    const-string v5, "name"

    invoke-direct {v4, v5}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v4

    .line 434
    :cond_0
    new-instance v3, Ljava/util/LinkedList;

    invoke-direct {v3}, Ljava/util/LinkedList;-><init>()V

    .line 436
    .local v3, values:Ljava/util/LinkedList;,"Ljava/util/LinkedList<Ljava/lang/String;>;"
    invoke-static {p1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->hash(Ljava/lang/String;)I

    move-result v1

    .line 437
    .local v1, h:I
    invoke-static {v1}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->index(I)I

    move-result v2

    .line 438
    .local v2, i:I
    iget-object v4, p0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->entries:[Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    aget-object v0, v4, v2

    .line 439
    .local v0, e:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;
    :goto_0
    if-eqz v0, :cond_2

    .line 440
    iget v4, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->hash:I

    if-ne v4, v1, :cond_1

    iget-object v4, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->key:Ljava/lang/String;

    invoke-static {p1, v4}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->eq(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 441
    iget-object v4, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->value:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/util/LinkedList;->addFirst(Ljava/lang/Object;)V

    .line 443
    :cond_1
    iget-object v0, v0, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;->next:Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders$Entry;

    goto :goto_0

    .line 445
    :cond_2
    return-object v3
.end method

.method removeHeader(Ljava/lang/String;)V
    .locals 5
    .parameter "name"

    .prologue
    .line 326
    if-nez p1, :cond_0

    .line 327
    new-instance v3, Ljava/lang/NullPointerException;

    const-string v4, "name"

    invoke-direct {v3, v4}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v3

    .line 329
    :cond_0
    invoke-virtual {p1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v2

    .line 330
    .local v2, lowerCaseName:Ljava/lang/String;
    invoke-static {v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->hash(Ljava/lang/String;)I

    move-result v0

    .line 331
    .local v0, h:I
    invoke-static {v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->index(I)I

    move-result v1

    .line 332
    .local v1, i:I
    invoke-direct {p0, v0, v1, v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->removeHeader0(IILjava/lang/String;)V

    .line 333
    return-void
.end method

.method setHeader(Ljava/lang/String;Ljava/lang/Iterable;)V
    .locals 8
    .parameter "name"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/lang/Iterable",
            "<*>;)V"
        }
    .end annotation

    .prologue
    .line 383
    .local p2, values:Ljava/lang/Iterable;,"Ljava/lang/Iterable<*>;"
    if-nez p2, :cond_0

    .line 384
    new-instance v6, Ljava/lang/NullPointerException;

    const-string v7, "values"

    invoke-direct {v6, v7}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v6

    .line 387
    :cond_0
    invoke-virtual {p1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    .line 388
    .local v3, lowerCaseName:Ljava/lang/String;
    invoke-static {v3}, Lorg/jboss/netty/handler/codec/spdy/SpdyCodecUtil;->validateHeaderName(Ljava/lang/String;)V

    .line 390
    invoke-static {v3}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->hash(Ljava/lang/String;)I

    move-result v0

    .line 391
    .local v0, h:I
    invoke-static {v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->index(I)I

    move-result v1

    .line 393
    .local v1, i:I
    invoke-direct {p0, v0, v1, v3}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->removeHeader0(IILjava/lang/String;)V

    .line 394
    invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v2

    .local v2, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v6

    if-eqz v6, :cond_1

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v5

    .line 395
    .local v5, v:Ljava/lang/Object;
    if-nez v5, :cond_2

    .line 402
    .end local v5           #v:Ljava/lang/Object;
    :cond_1
    return-void

    .line 398
    .restart local v5       #v:Ljava/lang/Object;
    :cond_2
    invoke-static {v5}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->toString(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    .line 399
    .local v4, strVal:Ljava/lang/String;
    invoke-static {v4}, Lorg/jboss/netty/handler/codec/spdy/SpdyCodecUtil;->validateHeaderValue(Ljava/lang/String;)V

    .line 400
    invoke-direct {p0, v0, v1, v3, v4}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->addHeader0(IILjava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method setHeader(Ljava/lang/String;Ljava/lang/Object;)V
    .locals 4
    .parameter "name"
    .parameter "value"

    .prologue
    .line 372
    invoke-virtual {p1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v2

    .line 373
    .local v2, lowerCaseName:Ljava/lang/String;
    invoke-static {v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyCodecUtil;->validateHeaderName(Ljava/lang/String;)V

    .line 374
    invoke-static {p2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->toString(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    .line 375
    .local v3, strVal:Ljava/lang/String;
    invoke-static {v3}, Lorg/jboss/netty/handler/codec/spdy/SpdyCodecUtil;->validateHeaderValue(Ljava/lang/String;)V

    .line 376
    invoke-static {v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->hash(Ljava/lang/String;)I

    move-result v0

    .line 377
    .local v0, h:I
    invoke-static {v0}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->index(I)I

    move-result v1

    .line 378
    .local v1, i:I
    invoke-direct {p0, v0, v1, v2}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->removeHeader0(IILjava/lang/String;)V

    .line 379
    invoke-direct {p0, v0, v1, v2, v3}, Lorg/jboss/netty/handler/codec/spdy/SpdyHeaders;->addHeader0(IILjava/lang/String;Ljava/lang/String;)V

    .line 380
    return-void
.end method
